package cn.com.haopy.dataes.db.service.erp.impl;

import cn.com.haopy.dataes.db.entity.erp.ErpGoods;
import cn.com.haopy.dataes.db.mapper.erp.ErpGoodsMapper;
import cn.com.haopy.dataes.db.service.erp.ErpGoodsService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ErpGoodsServiceImpl extends ServiceImpl<ErpGoodsMapper, ErpGoods> implements ErpGoodsService {


    public List<ErpGoods> queryLimit(Integer limit) {
        LambdaQueryWrapper<ErpGoods> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ErpGoods::getInterfaceFlag, "N");

        queryWrapper.last(" and  rownum <= " + limit);

        return super.list(queryWrapper);
    }


}
